win32{
QT       += core gui xml network sql
}
unix{
QT       += core gui xml network
}

greaterThan(QT_MAJOR_VERSION, 4): QT += widgets

TARGET = dynamicMap
TEMPLATE = app

CONFIG += c++11
QMAKE_CXXFLAGS+=-std=c++0x

#DEFINES +=IO_EPOLL
DEFINES +=IO_SELECT


# The following define makes your compiler emit warnings if you use
# any Qt feature that has been marked deprecated (the exact warnings
# depend on your compiler). Please consult the documentation of the
# deprecated API in order to know how to port your code away from it.
DEFINES += QT_DEPRECATED_WARNINGS

# You can also make your code fail to compile if it uses deprecated APIs.
# In order to do so, uncomment the following line.
# You can also select to disable deprecated APIs only up to a certain version of Qt.
#DEFINES += QT_DISABLE_DEPRECATED_BEFORE=0x060000    # disables all the APIs deprecated before Qt 6.0.0

#RC_ICONS = logo.ico

LIBS += -lpthread

#win32{
#CONFIG += console
#}

TRANSLATIONS += language/langEnglish.ts \
                language/langChinese.ts

SOURCES += \
    common/huaqimovie.cpp \
    json/JsonCheck.cpp \
    json/jsoncpp.cpp \
    main.cpp \
    view/doorview.cpp \
    view/etaview.cpp \
    view/nextview.cpp \
    view/nowview.cpp \
    view/stationwayview.cpp \
    view/subtractview.cpp \
    view/trainview.cpp \
    view/stationview.cpp \
    view/lineview.cpp \
    view/pointview.cpp \
    view/terminalview.cpp \
    view/startview.cpp \
    view/timeview.cpp \
    view/arriveview.cpp \
    view/singleview.cpp \
    widget/simulatewidget.cpp \
    common/hqlabel.cpp \
    common/myanimation.cpp \
    common/myplaceway.cpp \
    common/viewobject.cpp \


HEADERS += \
    common/common.h \
    common/huaqimovie.h \
    common/paramobject.h \
    common/viewobject.h \
    json/JsonCheck.h \
    json/json-forwards.h \
    json/json.h \
    view/doorview.h \
    view/etaview.h \
    view/nextview.h \
    view/nowview.h \
    view/stationwayview.h \
    view/subtractview.h \
    view/trainview.h \
    view/stationview.h \
    view/lineview.h \
    view/pointview.h \
    view/terminalview.h \
    view/startview.h \
    view/timeview.h \
    view/arriveview.h \
    view/singleview.h \
    widget/simulatewidget.h \
    common/hqlabel.h \
    common/myanimation.h \
    common/myplaceway.h \


win32{
    SOURCES += \
        mainwindow.cpp \
        common/mycombox.cpp \
        common/myfiledialog.cpp \
        common/mylineedit.cpp \
        common/newdialog.cpp \
        common/mydatabase.cpp \
        widget/attributewidget.cpp \
        widget/componentwidget.cpp \
        widget/editwidget.cpp \
        widget/guidewidget.cpp \
        widget/itemwidget.cpp \
        widget/setformatdlg.cpp \
        widget/showwidget.cpp \
        widget/stationwidget.cpp \
        widget/structurewidget.cpp \
        widget/configwidget.cpp \
        widget/alllineresetwidget.cpp \
        widget/lineresetwidget.cpp \
        dynamicmapmanagewindow.cpp \
        dynamicmapshowwindow.cpp \
        widget/stylesetwidget.cpp \

    HEADERS += \
        mainwindow.h \
        common/mycombox.h \
        common/nofocusdelegate.h \
        common/myfiledialog.h \
        common/mylineedit.h \
        common/newdialog.h \
        common/mydatabase.h \
        widget/attributewidget.h \
        widget/componentwidget.h \
        widget/editwidget.h \
        widget/guidewidget.h \
        widget/itemwidget.h \
        widget/setformatdlg.h \
        widget/showwidget.h \
        widget/stationwidget.h \
        widget/structurewidget.h \
        widget/configwidget.h \
        widget/alllineresetwidget.h \
        widget/lineresetwidget.h \
        dynamicmapmanagewindow.h \
        dynamicmapshowwindow.h \
        widget/stylesetwidget.h \
}

unix{
    SOURCES += \
        common/protocolparse.cpp \
        dynamicmap.cpp \
        dynamicmapmanagewindow.cpp \
        dynamicmapshowwindow.cpp \
        common/oscbb.cpp \
        common/dplink.cpp
    HEADERS += \
        common/protocolparse.h \
        dynamicmap.h \
        dynamicmapmanagewindow.h \
        dynamicmapshowwindow.h \
        common/oscbb.h \
        common/dplink.h
}
win32{
TRANSLATIONS +=
}

INCLUDEPATH += $$PWD/widget/
INCLUDEPATH += $$PWD/common/
INCLUDEPATH += $$PWD/json/
INCLUDEPATH += $$PWD/view/

#win32:{
#INCLUDEPATH += $$PWD/zip/include/
#DEPENDPATH += $$PWD/zip/include
#    CONFIG(release, debug |release){
#        LIBS += -L$$PWD/zip/lib32 -lquazip
#    }
#    CONFIG(debug, debug | release){
#        LIBS += -L$$PWD/zip/lib32 -lquazipd
#    }
#}

win32:{
INCLUDEPATH += $$PWD/zip/include/
DEPENDPATH += $$PWD/zip/include
contains(QT_ARCH, i386) {
        message("32-bit")
        CONFIG(release, debug |release){
            LIBS += -L$$PWD/zip/lib32 -lquazip
        }
        CONFIG(debug, debug | release){
            LIBS += -L$$PWD/zip/lib32 -lquazipd
        }
    } else {
        message("64-bit")
        CONFIG(release, debug |release){
            LIBS += -L$$PWD/zip/lib64 -lquazip
        }
        CONFIG(debug, debug | release){
            LIBS += -L$$PWD/zip/lib64 -lquazipd
        }
    }
}
# Default rules for deployment.
qnx: target.path = /tmp/$${TARGET}/bin
else: unix:!android: target.path = /opt/$${TARGET}/bin
!isEmpty(target.path): INSTALLS += target

RESOURCES += \
    resources.qrc

FORMS += \
    widget/alllineresetwidget.ui \
    widget/lineresetwidget.ui \
    widget/simulatewidget.ui

DISTFILES += \
    logo.rc

RC_FILE += logo.rc



